/*
 * @Description: Service层
 * @Author: franktrue 807615827@qq.com
 * @Date: 2021-07-30 09:13:56
 * @LastEditTime: 2021-07-30 15:34:12
 */
package service

import (
	"context"
	"github.com/franktrue/blog-service/global"
	"github.com/franktrue/blog-service/internal/dao"
)

type Service struct {
	ctx context.Context
	dao *dao.Dao
}

func NewService(ctx context.Context) *Service {
	service := Service{ctx: ctx}
	service.dao = dao.NewDao(global.DBEngine)
	return &service
}
